<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 技术随笔</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- 顶部返回链接 -->
<div class="login-header">
    <a href="index.html" class="back-home">← 返回主页</a>
</div>

<!-- 主体登录表单 -->
<div class="login-main">
    <div class="login-container">
        <h2 class="login-title">账号登录</h2>
        <!-- 登录表单：提交事件绑定到JS验证 -->
        <form id="loginForm" class="login-form">
            <!-- 用户名输入框 -->
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" placeholder="请输入用户名">
                <span class="error-message"></span>
            </div>
            <!-- 密码输入框 -->
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" placeholder="请输入密码">
                <span class="error-message"></span>
            </div>
            <!-- 登录按钮 -->
            <button type="submit" class="login-btn">登录</button>
        </form>
    </div>
</div>

<!-- 页脚 -->
<div class="footer">
    <p>© 2025 技术随笔 | 用代码记录成长</p>
</div>

<!-- 引入登录验证脚本 -->
<script src="js/login.js"></script>
</body>
</html>